#pragma once

class Fibkind
{
public:
    static int lengthSupUK(int n, int k);
    static int comp(int n);
};

int Fibkind::lengthSupUK(int n, int k){
    int seq[1000000] = {1, 1};
    int count = 0;
    for( int i = 2; i < n; ++ i ){
        seq[i] = seq[i-seq[i-1]] + seq[i-seq[i-2]];
        count += seq[i] >= k;
    }
    return count;
}

int Fibkind::comp( int n )
{
    int seq[1000000] = {1, 1};
    int count = 0;
    for( int i = 2; i < n; ++ i ){
        seq[i] = seq[i-seq[i-1]] + seq[i-seq[i-2]];
        count += seq[i] < seq[i-1];
    }
    return count;
}


